﻿<%@ Page Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true" CodeFile="worldcup-contest.aspx.cs" EnableEventValidation="false" Inherits="worldcup_worldcup_contest" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="contents">
    <asp:ScriptManager ID="scriptManager" runat="server"></asp:ScriptManager>
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td>
                    <h1>World Cup - World Cup 2014 Contest</h1>
                </td>
            </tr>
            <tr id="trSearch" runat="server">
                <td>
                    <b>Report Type</b> :
                    <asp:DropDownList ID="ddlReportType" runat="server" AutoPostBack="true" 
                        onselectedindexchanged="ddlReportType_SelectedIndexChanged">
                        <asp:ListItem Value="0">Monthly</asp:ListItem>
                        <asp:ListItem Value="1" Selected="True">Daily</asp:ListItem>
                        <asp:ListItem Value="2">Customize</asp:ListItem>
                    </asp:DropDownList>&nbsp;
                    <b><asp:Label ID="lblFromDate" runat="server"></asp:Label></b>
                    <asp:DropDownList ID="ddlDay1" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth1" runat="server"> 
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear1" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                        <b><asp:Label ID="lblToDate" runat="server"></asp:Label></b>
                    <asp:DropDownList ID="ddlDay2" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth2" runat="server"> 
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear2" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                    <div style="display: none">
                        <asp:TextBox ID="txtReportType" runat="server"></asp:TextBox>
                        <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
                        <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
                    </div>
                    &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />&nbsp;&nbsp;&nbsp;<asp:Label ID="lblRecordCount" runat="server"></asp:Label>
                    <span class="admin_gridstyle" style="float:right; padding-right:5px">
                        <asp:HyperLink Visible="false" ID="hplPrint" NavigateUrl="" Target="_blank" runat="server"><img src="images/icons/icon_print.png" alt="print preview" /></asp:HyperLink>
                    </span>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:UpdatePanel runat="server" ID="upnlCallMeSummary">
                    <ContentTemplate>
                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                    <asp:GridView ID="grvWorldCupContest" runat="server" AutoGenerateColumns="False"  AllowSorting="true" 
                    Cellspacing="3" CellPadding="3" Width="100%" CssClass="admin_gridstyle" PagerStyle-CssClass="pgr" 
                    EmptyDataText="There are no data records to display." GridLines="None" DataKeyNames="WCUserId" 
                    onsorting="grvWorldCupContest_Sorting"> 
                    <Columns>
                        <asp:BoundField DataField="WCUserId" HeaderText="WCUserId" SortExpression="WCUserId" Visible="false" />
                        <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                        <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" />
                        <asp:BoundField DataField="CarMakeModelDesc" HeaderText="Car" SortExpression="CarMakeModelDesc" />
                        <asp:BoundField DataField="CommencementMonth" HeaderText="Commencement Monthe" SortExpression="CommencementMonth" />
                        <asp:BoundField DataField="Verified" HeaderText="Verified" SortExpression="Verified" />
                        <asp:BoundField DataField="CRM" HeaderText="CRM" SortExpression="CRM" />
                        <asp:BoundField DataField="NoofTimeRefer" HeaderText="No of Time Refer" SortExpression="NoofTimeRefer" />
                        <asp:CommandField ShowSelectButton="True" HeaderText="Friends" />
                    </Columns>
                    <FooterStyle />
                    <PagerStyle />
                    <SelectedRowStyle BackColor="LightGray" />
                    <HeaderStyle CssClass="admin_gridheader" />
                    <EditRowStyle />
                    <AlternatingRowStyle CssClass="admin_gridodd" />
                    <RowStyle CssClass="admin_grideven" />
                </asp:GridView>
                </ContentTemplate>
                </asp:UpdatePanel>
               </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnExport" runat="server" Text="Export" Visible="false" onclick="btnExport_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <h3>
                        Friends</h3>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:UpdatePanel runat="server" ID="uplCallStatus">
                    <ContentTemplate>
                    <asp:GridView ID="grvWorldCuFriend" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                        CellPadding="2" CssClass="admin_gridstyle" EmptyDataText="There are no data records to display."
                        GridLines="None" Width="100%" DataSourceID="sqlDsWorldCupFriend" DataKeyNames="WCFriendId">
                        <FooterStyle />
                        <PagerStyle />
                        <Columns>
                            <asp:BoundField DataField="WCFriendId" HeaderText="WCFriendId" SortExpression="WCFriendId" Visible="false" />
                            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                            <asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" />
                            <asp:BoundField DataField="NameContest" HeaderText="Customer Name" SortExpression="NameContest" />
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle />
                        <HeaderStyle CssClass="admin_gridheader" />
                        <EditRowStyle />
                        <AlternatingRowStyle CssClass="admin_gridodd" />
                        <RowStyle CssClass="admin_grideven" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqlDsWorldCupFriend" runat="server" ConnectionString="<%$ ConnectionStrings:GGR_DBConnectionString %>"
                        SelectCommand="sprocWorldCupFriendReportById" SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="grvWorldCupContest" Name="WCUserId" PropertyName="SelectedValue" Type="Int64" />
                            <asp:ControlParameter ControlID="txtReportType" Name="ReportType" PropertyName="Text" Type="Int16" />
                            <asp:ControlParameter ControlID="txtReportDate1" Name="ReportDate1" PropertyName="Text" Type="String" />
                            <asp:ControlParameter ControlID="txtReportDate2" Name="ReportDate2" PropertyName="Text" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
   </div>
</asp:Content>
